#ifndef MONGRAPH_H
#define MONGRAPH_H

#include <QGraphicsItem>
#include <QPainter>
#include <vector>
#include "mweraBase.h"
#include "point.h"
#include "link.h"

class MonGraph : public QGraphicsItem{
public:
    MonGraph();
    QRectF boundingRect() const;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
    void nextStep();
private:
    Point* debut;
    Point* fin;
    int step;
    int dx,dy,rx,ry;
    MweraBase gr;
    void paintPoint(Point* p, QPainter* painter);
    void paintLink(Link* l, QPainter* painter,bool chemin=false);
};

#endif // MONGRAPH_H
